﻿Imports System
Imports System.Web.UI
Imports DevExpress.Web.ASPxEditors
Partial Class Pruebas
    Inherits System.Web.UI.Page
    Protected Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As EventArgs)
        '// Set Date Time value into the TextBox control
        TextBox1.Text = Calendar1.SelectedDate.ToString("MM/dd/yyyy") + " " + DateTime.Now.ToString("hh:mm:ss tt")

        '// Hide the Calendar control after selecting the date
        Calendar1.Visible = False

        '// Change the Button text back to "+"
        Button1.Text = "+"
    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
        '// If Calendar is not visible
        '// then show it and set the
        '// Button text to "-"
        If (Calendar1.Visible = False) Then
            Calendar1.Visible = True
            Button1.Text = "-"
        Else
            '// Hide the Calendae control
            '// if it is in visible state.
            Calendar1.Visible = False

            '// set the button text back to "+"
            Button1.Text = "+"
        End If
    End Sub
End Class